package crawler;

import java.util.concurrent.ArrayBlockingQueue;

public class DocumentPool {
	public static final int CAPABILITY = 1000;
	private ArrayBlockingQueue<CrawlerDocument> _queue = 
		new ArrayBlockingQueue<CrawlerDocument>(CAPABILITY);

	public void put(CrawlerDocument doc) throws InterruptedException{
		_queue.put(doc);
	}
	
	public CrawlerDocument take() throws InterruptedException{
		return _queue.take();
	}
	
	public int size(){
		return _queue.size();
	}
	
}